package com.farm.equipment.states;

import com.farm.equipment.Equipment;
import com.farm.equipment.EquipmentState;

public class IdleState implements EquipmentState {
    @Override
    public void start(Equipment equipment) {
        System.out.println("设备从空闲状态启动");
        equipment.setState(new WorkingState());
    }

    @Override
    public void stop(Equipment equipment) {
        System.out.println("设备已经处于空闲状态");
    }

    @Override
    public void work(Equipment equipment) {
        System.out.println("设备需要先启动才能工作");
    }

    @Override
    public void maintain(Equipment equipment) {
        System.out.println("设备进入维护状态");
        equipment.setState(new MaintenanceState());
    }
} 